﻿/***************************************************************
 * 开发人员：网魂小兵@http://www.mozlite.com
 * 
 * 目标标本：4.0.30319.239
 * 
 * 最后修改：2011/12/17 4:34:23
 * ************************************************************/
namespace Mozlite.Web.UI
{
    using System;
    using System.Linq;
    using System.Text;
    using System.Collections.Generic;

    /// <summary>
    /// WOW模板注册器。
    /// </summary>
    public class WowUrls : CommonUrls
    {
        /// <summary>
        /// 初始化类<see cref="T:Mozlite.Web.UI.WowUrls"/>。
        /// </summary>
        public WowUrls() { }

        /// <summary>
        /// 注册通用路由。
        /// </summary>
        /// <param name="routes">路由集合。</param>
        public override void RouteRegister(System.Web.Routing.RouteCollection routes)
        {
            routes.RegisterUrl(LogMgr, "LogMgr", new { controller = "Home", action = "LogMgr" });
            routes.RegisterUrl(PostMgr, "PostMgr", new { controller = "Home", action = "PostMgr" });
            routes.RegisterUrl(CategoryMgr, "CategoryMgr", new { controller = "Home", action = "CategoryMgr" });
            routes.RegisterUrl(Post, "Post/{key}", new { controller = "Home", action = "Post" }, new { key = "[a-z0-9\\-_]+" });
            routes.RegisterUrl(Category, "Category/{key}", new { controller = "Home", action = "Category" }, new { key = "[a-z0-9\\-_]+" });
            routes.RegisterUrl(Download, "Download", new { controller = "Home", action = "Download" });
            routes.RegisterUrl(Donate, "Donate", new { controller = "Home", action = "Donate" });
            routes.RegisterUrl(RaidersView, "raiders", new { controller = "Home", action = "RaidersView" });
            routes.RegisterUrl(LogsView, "logs", new { controller = "home", action = "logsview" });
        }
        /// <summary>
        /// 下载。
        /// </summary>
        private const string Download = "WOW_Download";
        /// <summary>
        /// 赞助。
        /// </summary>
        private const string Donate = "WOW_Donate";
        /// <summary>
        /// 日志访问列表。
        /// </summary>
        private const string LogsView = "WOW_logsview";
        /// <summary>
        /// 攻略路径。
        /// </summary>
        private const string RaidersView = "WOW_raidersview";
        /// <summary>
        /// 日志管理。
        /// </summary>
        private const string LogMgr = "WOW_LogMgr";
        /// <summary>
        /// 发布文档。
        /// </summary>
        private const string PostMgr = "WOW_PostMgr";
        /// <summary>
        /// 分类列表。
        /// </summary>
        private const string CategoryMgr = "WOW_CategoryMgr";
        /// <summary>
        /// 帖子。
        /// </summary>
        private const string Post = "WOW_Post";
        /// <summary>
        /// 分类。
        /// </summary>
        private const string Category = "WOW_Category";

        private static string GetUrl(string name, object values = null)
        {
            return FormatUrl(name.AppendThemeName(), values);
        }

        /// <summary>
        /// 下载。
        /// </summary>
        public static string Download_WowUrl { get { return GetUrl(Download); } }
        /// <summary>
        /// 赞助。
        /// </summary>
        public static string Donate_WowUrl { get { return GetUrl(Donate); } }
        /// <summary>
        /// 日志访问列表。
        /// </summary>
        public static string LogsView_WowUrl { get { return GetUrl(LogsView); } }
        /// <summary>
        /// 攻略路径。
        /// </summary>
        public static string RaidersView_WowUrl { get { return GetUrl(RaidersView); } }
        /// <summary>
        /// 日志管理。
        /// </summary>
        public static string LogMgr_WowUrl { get { return GetUrl(LogMgr); } }
        /// <summary>
        /// 发布文档。
        /// </summary>
        public static string PostMgr_WowUrl { get { return GetUrl(PostMgr); } }
        /// <summary>
        /// 分类列表。
        /// </summary>
        public static string CategoryMgr_WowUrl { get { return GetUrl(CategoryMgr); } }
        /// <summary>
        /// 帖子。
        /// </summary>
        public static string Post_WowUrl { get { return GetUrl(Post); } }
        /// <summary>
        /// 分类。
        /// </summary>
        public static string Category_WowUrl { get { return GetUrl(Category); } }
    }
}